{% extends "exploration/base.html" %}

{% block content %}
	<script type="text/javascript">
	<!--

	function confirm_delete() {
		var answer = confirm("Delete Object?")
		if (answer) {
			document.deleteForm.submit()
		}
	}

	-->
	</script>
	<h1>Edit Object</h1>
	<form action="/objects/edit/{{ object_id }}" method="post">
		{% csrf_token %}
		{% include "exploration/objects/form.html" %}
		<p><input type="submit" name='save' value="Save Object"/></p>
	</form>
	<form action="/objects/edit/{{ object_id }}" name="deleteForm" method="post">
		{% csrf_token %}
		<input type="hidden" name="delete" value="ok">
		<p><input type="button" value="Delete" onclick="confirm_delete()"/></p>
	</form>
	<a href="/">&larr; Back<a>
{% endblock %}